package com.wuzhiming.istudy.service.impl;

import com.wuzhiming.istudy.pojo.Note;
import com.wuzhiming.istudy.service.BaseService;
import com.wuzhiming.istudy.service.NoteService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: commentServiceImpl
 * @Description:
 * @Author:zhimingw
 * @Version 1.0
 * @since 2022/3/16 19:58
 */
@Service("noteService")
public class NoteServiceImpl extends BaseService implements NoteService
{

    @Override
    public boolean addNote(Note note) {
        if (noteMapper.addNote(note)==1){
            return true;
        }
        return false;
    }

    @Override
    public List<Note> getUserNote(Note note) {
        return noteMapper.getUserNote(note);
    }

    @Override
    public Note getNoteDetail(Integer id) {
        return noteMapper.getNoteDetail(id);
    }


    @Override
    public boolean update(Note note) {
        if(noteMapper.update(note)==1){
            return true;
        }
        return false;
    }
}
